package com.walleipt.demo.ioc.beanPostProcessor.simpleBeanPostProcessor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

@Component
public class MyBeanPostProcessor implements BeanPostProcessor,BeanFactoryAware{

	public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
		System.err.println( "postProcessBeforeInitialization.......");
		return bean;
	}

	public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
		System.err.println( "postProcessAfterInitialization........");
		return bean;
	}

	public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
		System.err.println( beanFactory );
	}

}
